<%@ page import="com.oyb.entity.Admin" %><%--
  Created by IntelliJ IDEA.
  User: 11954
  Date: 2022/3/30
  Time: 16:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!-- 引入jstl的函数 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<html>
<head>
    <title>添加学生</title>
    <link rel="stylesheet" href="css/login.css">
</head>
<body>
            <c:if test="${param.status == '5'}">
                <script>alert("添加成功！");</script>
            </c:if>
            <c:if test="${!fn:contains(login_user.power,'1')}">
                <c:redirect url="nopower.jsp"/>
            </c:if>
        <h1>添加学生</h1>
        <hr>
        <form action="addstudent" method="post">
            姓名：<input name="name"><br><br>
            性别：<input type="radio" name="sex" value="1">男 <input type="radio" name="sex" value="0">女
            班级：<select name="classes_id">
                    <c:forEach items="${classeslist}" var="classes">
                        <option value="${classes.id}">${classes.class_name}(${classes.class_count})</option>
                    </c:forEach>
                </select>
            <c:if test="${param.status=='1'}">
                <span class="error">输入为空！</span>
            </c:if>
            <br><br>
            <button>添加</button>
        </form>
        <a href="index.jsp">回首页</a>
</body>
</html>
